package com.share.tool.devops.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * http请求日志表
 * </p>
 *
 * @author baidu
 * @since 2021-06-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("th_http_request_log")
public class HttpRequestLog extends Model<HttpRequestLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("g_code")
    private String gCode;

    /**
     * 接口id
     */
    @TableField("interface_id")
    private Integer interfaceId;

    /**
     * 请求参数
     */
    @TableField("request_param")
    private String requestParam;

    /**
     * 响应结果
     */
    @TableField("respond_data")
    private String respondData;

    /**
     * 请求成功否:0失败,1成功
     */
    @TableField("status")
    private Integer status;

    /**
     * 请求完成耗时(单位毫秒)
     */
    @TableField("process_time")
    private Long processTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
